/*
 * @Author: 高瑞寒 15932717091@163.com
 * @Date: 2022-05-18 14:38:05
 * @LastEditTime: 2022-05-18 17:37:16
 * @LastEditors: 高瑞寒 15932717091@163.com
 * @Description:
 */
import request from '@/utils/request'
// 获取全部角色
export const getAllRoles = () => {
  return request({
    url: '/role/list'
  })
}
// 获取角色权限
export const getRolePermission = (id) => {
  return request({
    url: `/role/permission/${id}`
  })
}
// 获取所有权限
export const getAllPermission = () => {
  return request({
    url: '/permission/list'
  })
}
// 为角色赋权限
export const updateRolePermission = (data) => {
  return request({
    url: '/role/distribute-permission',
    method: 'POST',
    data
  })
}
